// ecindex_test.cpp : Defines the entry point for the console application.
//

#include "ecindex_test_pch.h"
#include "../eccommon/network.h"
#include "../eccommon/data.h"

static const unsigned short SERVER_PORT = 61978;

using namespace std;
using namespace ec;
using namespace ec::TestData;
using namespace ec::SerializationServer;

std::vector<Person> GetPeople()
{
	vector<Person> people;

	people.push_back(Person(33, "Scott R. Jones", (6 * 12) - 1));
	people.push_back(Person(36, "Sarah S. Jones", (5 * 12) - 1));
	people.push_back(Person(14, "Tyler R. Cusson", (5 * 12) + 6));
	people.push_back(Person(11, "Kimberly L. Jones", (4 * 12) + 3));
	people.push_back(Person(10, "Lauren A. Jones", (4 * 12) + 4));

	return people;
}

int main(int argc, char* argv[])
{
	boost::asio::io_service ioService;

	Server<Person> teleporterServer(ioService, SERVER_PORT,
		Server<Person>::OnGetDataFunction(GetPeople));

	ioService.run();
	getc(stdin);

	return 0;
}

